package cn.com.blueInfo.HaiYuan.business.invoice.controller;

import cn.com.blueInfo.HaiYuan.business.invoice.service.InvoiceDetailedService;
import cn.com.blueInfo.utils.result.BootstrapTable;
import cn.com.blueInfo.utils.result.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 发票详细信息管理
 * @ClassName: InvoiceDetailedController
 * @author suxch
 * @date 2019年4月24日  上午10:30:12
 */
@RestController
@RequestMapping("/operation/business/invoiceDetailed")
public class InvoiceDetailedController {

    @Autowired
    private InvoiceDetailedService detailedService;

    /**
     * 分页查询发票详细信息
     * @Title: queryInvoiceDetailedInfoByPage
     * @param request
     * @return BootstrapTable
     * @throws
     */
    @RequestMapping("/queryInvoiceDetailedInfoByPage.do")
    public BootstrapTable queryInvoiceDetailedInfoByPage(HttpServletRequest request) {
        return detailedService.queryInvoiceDetailedDataByPage(request);
    }

    /**
     * 获取最大排序编号
     * @Title: getMaxOrderNumber
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/getMaxOrderNumber.do")
    public ResultInfo getMaxOrderNumber(HttpServletRequest request) {
        return detailedService.queryMaxOrderNumber(request);
    }

    /**
     * 新增发票详细信息
     * @Title: addInvoiceDetailedInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/addInvoiceDetailedInfo.do")
    public ResultInfo addInvoiceDetailedInfo(HttpServletRequest request) {
        return detailedService.addInvoiceDetailedData(request);
    }

    /**
     * 更新发票详细信息
     * @Title: updateInvoiceDetailedInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/updateInvoiceDetailedInfo.do")
    public ResultInfo updateInvoiceDetailedInfo(HttpServletRequest request) {
        return detailedService.updateInvoiceDetailedData(request);
    }

    /**
     * 删除发票详细信息
     * @Title: deleteInvoiceDetailedInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/deleteInvoiceDetailedInfo.do")
    public ResultInfo deleteInvoiceDetailedInfo(HttpServletRequest request) {
        return detailedService.deleteInvoiceDetailedData(request);
    }


}
